// ----------------- ID Constants --------------------------------------------
#define IddTankRespawnDialog  1230
#define IdcCbHumanRespawnList  1231
#define IdcTankMap 1232
#define IdcBtMatrixInsert 1233
#define IdcCbWeaponList 1234
#define IdcCbAmmoList 1235
#define IdcBtAddWeapon 1236
#define IdcBtAddAmmo 1237
#define IdcCbCabList 1238
#define IdcBtMatrixExtract 1239   
#define IdcCbHumanExtractList 1240
#define IdcDdlFollowList 1241
#define IdcBtFollowHuman 1242
         
// ---------------- positions constants --------------------------------------
#define ScreenWidth safeZoneW
#define ScreenHeight safeZoneH
#define ScreenX safeZoneX
#define ScreenY safeZoneY

#define TankMenuW 0.3//(ScreenWidth - (ScreenWidth * 0.85))
#define TankMenuX ScreenX+(ScreenWidth - TankMenuW)
#define TankMenuY ScreenY

#define TankMenuH ScreenHeight

#define ControlsMargin 0.015

#define cbListH (4 * ControlFontSize)

#define HumanListTitleY (ScreenY + ControlsMargin) //ScreenY //+ (TankMenuW*0.1)

#define cbHumanRespawnListX (TankMenuX + ControlsMargin)//TankMenuMargin //(TankMenuW * 0.1)//(TankMenuW/2)//+ (TankMenuW*0.1)
#define cbHumanRespawnListY HumanListTitleY + ControlFontSize+(ControlsMargin)
#define cbHumanRespawnListW (TankMenuW-2*ControlsMargin)

#define CabListTitleY cbHumanRespawnListY+(ControlsMargin+cbListH)
#define cbCabListY CabListTitleY + ControlFontSize+(ControlsMargin)
#define cbCabListH cbListH

#define BtMatrixInsertX cbHumanRespawnListX
#define BtMatrixInsertY (cbCabListY + cbCabListH+ControlsMargin)

//#define CbHumanExtractListY (BtMatrixInsertY + cbCabListH+ControlsMargin)
#define BtMatrixExtractY (BtMatrixInsertY + ControlFontSize+(ControlsMargin*2))

#define DdlFollowListTitleY (BtMatrixExtractY + ControlFontSize*4+(ControlsMargin*2))

#define DdlFollowListY DdlFollowListTitleY + ControlFontSize+(ControlsMargin)
#define DdlFollowListX cbHumanRespawnListX
#define BtFollowHumanY (DdlFollowListY + ControlFontSize+(ControlsMargin))

#define BtAddWeaponY (ScreenY+ScreenHeight)-(ControlsMargin+cbListH)
#define cbWeaponListY BtAddWeaponY-(ControlsMargin+cbListH)

//#define BtAddAmmoY cbWeaponListY-(ControlsMargin+cbListH)
//#define cbAmmoListY BtAddAmmoY-(ControlsMargin+(ControlsMargin+cbListH))

#define SliderCamAngleTitleY BtFollowHumanY+ControlFontSize+ControlsMargin*2
#define SliderCamAngleY SliderCamAngleTitleY + ControlFontSize+(ControlsMargin)

#define SliderCamDistanceTitleY SliderCamAngleY+ControlFontSize+ControlsMargin
#define SliderCamDistanceY SliderCamDistanceTitleY + ControlFontSize+(ControlsMargin)

#define SliderCamHeightTitleY SliderCamDistanceY+ControlFontSize+ControlsMargin
#define SliderCamHeightY SliderCamHeightTitleY + ControlFontSize+(ControlsMargin)

#define TankMapX ScreenX
#define TankMapY ScreenY
#define TankMapW 0.3//ScreenWidth*0.999
#define TankMapH 0.3//ScreenHeight

#define textColor {0, 1, 0, 1}



class TankRespawnDialog {
    idd = IddTankRespawnDialog;

    movingEnable = false;
	
    objects[] = {};
	
	
    class controlsBackground {
		
		class TankMap : RscMapControl {
            idc = IdcTankMap;
            x = TankMapX;
            y = TankMapY;
            w = TankMapW;
            h = TankMapH;

        };
        
		
		/* class dialogBack : RscBack {
            x = ScreenX;
            y = ScreenY;
            w = ScreenWidth;
            h = ScreenHeight;
			colorBackground[] = {1, 1, 1, };
        };
 */
    };

    class controls {

	
		
		class menuBack : RscBack {
            x = TankMenuX;
            y = TankMenuY;
            w = TankMenuW;
            h = TankMenuH;
			colorBackground[] = {0, 0, 0, 0.85};
        };
				
		class HumanListTitle : MatrixText{
			text = "Humain dans le monde reel :"; 
			x = cbHumanRespawnListX;	
			w = cbHumanRespawnListW;		
			y = HumanListTitleY;			
		};
		
        class cbHumanRespawnList : MatrixListBox {
            idc = IdcCbHumanRespawnList;

            x = cbHumanRespawnListX;
            y = cbHumanRespawnListY;
            w = cbHumanRespawnListW;
            h = cbListH;		
			
			ScrollBar = true;
        };
		
		
		/* 
         */

		
         class BtMatrixInsert : MatrixButton {
            idc = IdcBtMatrixInsert;
            x = BtMatrixInsertX;
            y = BtMatrixInsertY;
            w = cbHumanRespawnListW;
            
            text = "Inserer dans la Matrice";   

			action = "";

        };
		
		class BtMatrixExtract : BtMatrixInsert {
            idc = IdcBtMatrixExtract;
            y = BtMatrixExtractY;
            
            text = "Lancer l'appel d'extraction";   

			action = "";

        };
		
		class CabListTitle : HumanListTitle {
			text = "Cabine d'insertion :"; 					
			y = CabListTitleY;			
		};
		
		class CbCabList : cbHumanRespawnList {
		
            idc = IdcCbCabList;
            y = cbCabListY;
			h = cbCabListH;

        };
		
		/*
			Camera Follow
		*/
		
		class BtFollowHuman : BtMatrixInsert {
            idc = IdcBtFollowHuman;
            y = BtFollowHumanY;
            
            text = "Suivre a la 3eme personne";   

			action = "";

        };
		
				
		class DdlFollowListTitle : HumanListTitle {
			text = "Personne a observer :"; 					
			y = DdlFollowListTitleY;			
		};
		
		
		class DdlFollowList : MatrixCombo {
		
            idc = IdcDdlFollowList;
            y = DdlFollowListY;
			x = DdlFollowListX;
			w = cbHumanRespawnListW;
        };
		
		class SliderCamAngleTitle : HumanListTitle {
			text = "Rotation autour :"; 					
			y = SliderCamAngleTitleY;			
		};
		
		class SliderCamAngle : RscSlider {
		
            idc = -1;
            y = SliderCamAngleY ;
			x = DdlFollowListX;
			w = cbHumanRespawnListW;
			//range[]={0,360};
			onSliderPosChanged = "CamAngle=((sliderPosition  (_this select 0))*360.0)/10.0;"; 
        };
		
		class SliderCamDistanceTitle : HumanListTitle {
			text = "Distance :"; 					
			y = SliderCamDistanceTitleY;			
		};
		
		class SliderCamDistance : RscSlider {
		
            idc = -1;
            y = SliderCamDistanceY;
			x = DdlFollowListX;
			w = cbHumanRespawnListW;
			//range[]={0,360};
			onSliderPosChanged = "CamDistance=((sliderPosition  (_this select 0))*200.0)/10.0;"; 
        };
		
		class SliderCamHeightTitle : HumanListTitle {
			text = "Hauteur :"; 					
			y = SliderCamHeightTitleY;			
		};
		
		class SliderCamHeight: RscSlider {
		
            idc = -1;
            y = SliderCamHeightY;
			x = DdlFollowListX;
			w = cbHumanRespawnListW;
			//range[]={0,360};
			onSliderPosChanged = "CamHeight=((sliderPosition  (_this select 0))*200.0)/10.0;"; 
        };
		
		 
		/*
			Equipment
		*/
		
		class cbWeaponList : cbHumanRespawnList {
		
            idc = IdcCbWeaponList;
            y = cbWeaponListY;

        };


		
/* 		
		class cbAmmoList : cbHumanRespawnList {
		
            idc = IdcCbAmmoList;
            y = cbAmmoListY;

        };
		 */
		class BtAddWeapon : MatrixButton {
            idc = IdcBtAddWeapon;
            x = BtMatrixInsertX;
            y = BtAddWeaponY;
            w = cbHumanRespawnListW;
            
            text = "Ajouter";   

			action = "";

        };
		
		/*
		class BtAddAmmo : MatrixButton {
            idc = IdcBtAddAmmo;
            x = BtMatrixInsertX;
            y = BtAddAmmoY;
            w = cbHumanRespawnListW;
            
            text = "Ajouter";   

			action = "";

        };
		
		 class MyRscStructuredText { 
			idc = -1; 
			type = CT_STRUCTURED_TEXT; 
			style = ST_LEFT; 
			colorBackground[] = { 1, 1, 1, 0 }; 
			
			x = 0.1; y = 0.1; w = 0.02; h = 1; 
			size = 0.018; 
			text = "test tet e e t tedsfg df df  op kop sopj zneip nziopenf klzne klnzlned lzkne lkznekl rnzkler "; 
			class Attributes { 
				font = "TahomaB"; 
				color = "#00FF00"; 
				align = "center"; 
				valign = "middle"; 
				shadow = false; 
				shadowColor = "#ff0000"; 
				size = "1"; 
			}; 
		}; */

    };


};